package com.scap.authen.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

@Entity
@Table( name = "JA_ROLE")
public class Role {
	
	@NotEmpty
	@Size(max = 2)
	@Id
	@Column ( name = "ROLE_ID", length = 2)
	private String vaRoleId;
	
	@Column ( name = "SITE_ID", length = 2, scale = 0)
	private String vaSiteId;
	
	@NotEmpty
	@Size(max = 200)
	@Column ( name = "ROLE_NAME", length = 200)
	private String vaRoleName;
	
	@NotNull
	@Column ( name = "STATUS", length = 1)
	private String vaStatus;
	
	@Column ( name = "APP_STATUS", length = 1)
	private String vaAppStatus;
	
	@Column ( name = "MENU_STATUS", length = 1)
	private String vaMenuStatus;
	
	@Column ( name = "INSERT_USER_ID")
	private int vnInsertUserId;
	
	@Column ( name = "INSERT_DATE", length = 8)
	private String vaInsertDate;
	
	@Column( name = "INSERT_TIME", length = 6)
	private String vaInsertTime;
	
	@Column ( name = "UPDATE_USER_ID")
	private int vnUpdateUserId;
	
	@Column ( name = "UPDATE_DATE", length = 8)
	private String vaUpdateDate;
	
	@Column ( name = "UPDATE_TIME", length = 6)
	private String vaUpdateTime;

	public Role(String vaRoleId, String vaSiteId, String vaRoleName,
			String vaStatus, String vaAppStatus, String vaMenuStatus,
			int vnInsertUserId, String vaInsertDate, String vaInsertTime,
			int vnUpdateUserId, String vaUpdateDate, String vaUpdateTime) {
		this.vaRoleId = vaRoleId;
		this.vaSiteId = vaSiteId;
		this.vaRoleName = vaRoleName;
		this.vaStatus = vaStatus;
		this.vaAppStatus = vaAppStatus;
		this.vaMenuStatus = vaMenuStatus;
		this.vnInsertUserId = vnInsertUserId;
		this.vaInsertDate = vaInsertDate;
		this.vaInsertTime = vaInsertTime;
		this.vnUpdateUserId = vnUpdateUserId;
		this.vaUpdateDate = vaUpdateDate;
		this.vaUpdateTime = vaUpdateTime;
	}
	
	public Role() {
		
	}
	
	public String getVaRoleId() {
		return vaRoleId;
	}
	public void setVaRoleId(String vaRoleId) {
		this.vaRoleId = vaRoleId;
	}
	public String getVaSiteId() {
		return vaSiteId;
	}
	public void setVaSiteId(String vaSiteId) {
		this.vaSiteId = vaSiteId;
	}
	public String getVaRoleName() {
		return vaRoleName;
	}
	public void setVaRoleName(String vaRoleName) {
		this.vaRoleName = vaRoleName;
	}
	public String getVaStatus() {
		return vaStatus;
	}
	public void setVaStatus(String vaStatus) {
		this.vaStatus = vaStatus;
	}
	public String getVaAppStatus() {
		return vaAppStatus;
	}
	public void setVaAppStatus(String vaAppStatus) {
		this.vaAppStatus = vaAppStatus;
	}
	public String getVaMenuStatus() {
		return vaMenuStatus;
	}
	public void setVaMenuStatus(String vaMenuStatus) {
		this.vaMenuStatus = vaMenuStatus;
	}
	public int getVnInsertUserId() {
		return vnInsertUserId;
	}
	public void setVnInsertUserId(int vnInsertUserId) {
		this.vnInsertUserId = vnInsertUserId;
	}
	public String getVaInsertDate() {
		return vaInsertDate;
	}
	public void setVaInsertDate(String vaInsertDate) {
		this.vaInsertDate = vaInsertDate;
	}
	public String getVaInsertTime() {
		return vaInsertTime;
	}
	public void setVaInsertTime(String vaInsertTime) {
		this.vaInsertTime = vaInsertTime;
	}
	public int getVnUpdateUserId() {
		return vnUpdateUserId;
	}
	public void setVnUpdateUserId(int vnUpdateUserId) {
		this.vnUpdateUserId = vnUpdateUserId;
	}
	public String getVaUpdateDate() {
		return vaUpdateDate;
	}
	public void setVaUpdateDate(String vaUpdateDate) {
		this.vaUpdateDate = vaUpdateDate;
	}
	public String getVaUpdateTime() {
		return vaUpdateTime;
	}
	public void setVaUpdateTime(String vaUpdateTime) {
		this.vaUpdateTime = vaUpdateTime;
	}

	@Override
	public String toString() {
		return "Role [vaRoleId=" + vaRoleId + ", vaSiteId=" + vaSiteId
				+ ", vaRoleName=" + vaRoleName + ", vaStatus=" + vaStatus
				+ ", vaAppStatus=" + vaAppStatus + ", vaMenuStatus="
				+ vaMenuStatus + ", vnInsertUserId=" + vnInsertUserId
				+ ", vaInsertDate=" + vaInsertDate + ", vaInsertTime="
				+ vaInsertTime + ", vnUpdateUserId=" + vnUpdateUserId
				+ ", vaUpdateDate=" + vaUpdateDate + ", vaUpdateTime="
				+ vaUpdateTime + "]";
	}
}
